package com.sergio.compress.cp.base;

import lombok.AllArgsConstructor;
import lombok.Data;

import java.util.Arrays;

/**
 * @Author : Sergio.D
 * @Description :
 * @CreateDate ：2023/6/14 16:50
 */
@Data
@AllArgsConstructor
public class DecompressResult {

    //压缩类型
    String type;

    //花费的时间
    long costTime;

    //压缩解压后的数据
    byte[] data;

    //元数据长度
    int lengthSource;
    //压缩后长度
    int lengthCompressed;

    boolean result;

    public DecompressResult(String type, long costTime, byte[] data, int lengthSource, int lengthCompressed) {
        this.type = type;
        this.costTime = costTime;
        this.data = data;
        this.lengthSource = lengthSource;
        this.lengthCompressed = lengthCompressed;
    }

    @Override
    public String toString() {
        return "DecompressResult{" +
                "type='" + type + '\'' +
                ", costTime=" + costTime +
                ", lengthSource=" + lengthSource +
                ", lengthCompressed=" + lengthCompressed +
                ", result=" + result +
                '}';
    }
}
